Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to latest FHIR engine SDK #2718

Merged
merged 31 commits into from
Sep 13, 2023
Merged

Migrate to latest FHIR engine SDK #2718

merged 31 commits into from
Sep 13, 2023

Conversation

ellykits
Copy link
Collaborator

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #2563 or Closes #2708

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

Signed-off-by: Elly Kitoto <[email protected]>
Signed-off-by: Elly Kitoto <[email protected]>
Signed-off-by: Elly Kitoto <[email protected]>
Signed-off-by: Elly Kitoto <[email protected]>
- Update sync and other code implementations using FhirEngine
Search API

Signed-off-by: Elly Kitoto <[email protected]>
Signed-off-by: Elly Kitoto <[email protected]>
Signed-off-by: Elly Kitoto <[email protected]>
@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #2718 (fd51f26) into main (ad3a737) will increase coverage by 1.0%.
Report is 47 commits behind head on main.
The diff coverage is 62.9%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #2718     +/-   ##
=========================================
+ Coverage     64.5%   65.6%   +1.0%     
+ Complexity    1075    1050     -25     
=========================================
  Files          218     220      +2     
  Lines         9635    9814    +179     
  Branches      1897    1801     -96     
=========================================
+ Hits          6218    6439    +221     
- Misses        2234    2272     +38     
+ Partials      1183    1103     -80     
Flag Coverage Δ
engine 72.3% <69.3%> (-0.4%) ⬇️
geowidget 65.5% <33.3%> (+1.1%) ⬆️
quest 61.0% <58.9%> (+2.0%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...ata/remote/fhir/resource/FhirResourceDataSource.kt 93.3% <0.0%> (+0.4%) ⬆️
...hircore/engine/domain/model/FhirResourceConfigs.kt 43.2% <0.0%> (-1.3%) ⬇️
...ster/fhircore/engine/p2p/dao/BaseP2PTransferDao.kt 86.6% <0.0%> (-3.8%) ⬇️
...martregister/fhircore/engine/sync/AppSyncWorker.kt 91.6% <0.0%> (-8.4%) ⬇️
...ter/fhircore/engine/sync/OpenSrpDownloadManager.kt 42.8% <0.0%> (ø)
...rtregister/fhircore/engine/sync/SyncBroadcaster.kt 30.4% <0.0%> (-2.9%) ⬇️
...rcore/engine/util/extension/BigDecimalExtension.kt 0.0% <0.0%> (ø)
...ore/engine/util/helper/TransformSupportServices.kt 80.0% <0.0%> (-2.8%) ⬇️
...ter/fhircore/quest/data/QuestXFhirQueryResolver.kt 0.0% <0.0%> (-100.0%) ⬇️
...fhircore/quest/ui/appsetting/AppSettingActivity.kt 0.0% <0.0%> (-48.4%) ⬇️
... and 51 more

... and 33 files with indirect coverage changes

@ellykits ellykits marked this pull request as ready for review September 12, 2023 07:14
pld
pld previously approved these changes Sep 12, 2023
@@ -92,7 +91,7 @@ constructor(
classType: Class<out Resource>,
): List<Resource> {
return withContext(dispatcherProvider.io()) {
val searchQuery =
/* val searchQuery =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove these lines?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be done in a separate PR #2730

@@ -158,7 +159,7 @@ class BaseP2PTransferDaoTest : RobolectricTest() {
}
val searchQuerySlot = slot<SearchQuery>()

coVerify { fhirEngine.search<Patient>(capture(searchQuerySlot)) }
// coVerify { fhirEngine.search<Patient>(capture(searchQuerySlot)) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be addressed via PR #2730

@@ -130,8 +130,6 @@ class QuestionnaireActivity : BaseMultiLanguageActivity() {
}

registerFragmentResultListener()

viewModel.setProgressState(QuestionnaireProgressState.QuestionnaireLaunch(false))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this no longer necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The progress dialog is dismissed in the finally section of the try-catch block.

Signed-off-by: Elly Kitoto <[email protected]>
Signed-off-by: Elly Kitoto <[email protected]>
@ellykits ellykits requested a review from pld September 13, 2023 11:06
@ellykits
Copy link
Collaborator Author

This PR requires re-installation of the app.

@ellykits ellykits merged commit ebe71b9 into main Sep 13, 2023
6 checks passed
@ellykits ellykits deleted the refactor-repositories branch September 13, 2023 15:36
@allan-on allan-on mentioned this pull request Sep 18, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants